package com.nut.spp.jbb.resp;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class JbbResult<T> implements Serializable {

    private static final long serialVersionUID = 1L;

//    {"code":200,"data":["alipay_qr","wx_pub"],"errorCode":"","msg":"SUCCESS","sum":""}

    //状态标识 200成功  其他值失败
    private Integer code = 0;
    private String errorCode;
    private String msg;
    private T data;

    public boolean isSuccess() {
        return this.code == 200 ? true : false;
    }

    public boolean isFail() {
        return this.code != 200 ? true : false;
    }

}
